import myAxios from "../plugins/myAxios.ts";

export const getCurrentUser = async () => {
  /*  const currentUser =  getCurrentUserState();
    if(currentUser){
        return currentUser;
    }*/
    const res = await myAxios.get('/user/current');
    if(res.code ===0 && res.data){
        return res.data;
    }
    return  null;
}
